@model List<ToDo.Models.InventoryViewModel>
@{
    Layout = null;
}

<div class="color-block" id="block1">
    <b>清单</b>
    <div id="myimg" onclick="viewCreateInventory()">
        <img class="add" src="~/images/Inventory/添加 (4).png" alt="图标" />
    </div>
</div>
<div id="invnetory-block">
    <ul>
        @foreach(var inventory in Model)
        {
            <li class="input-li">
                <div class="circle" onclick="showInventoryItems(@inventory.InventoryId)">
                    <label class="radio">
                        <input type="radio" name="radio" value="1"><i></i>
                    </label>
                </div>
                <a href="/Inventory/ShowModifyInventoryName?inventoryId=@inventory.InventoryId" title="修改清单">
                    <span class="input-inventory-name">@inventory.InventoryName</span>
                </a>
                <span class="input-inventory-time">
                @inventory.CreateTime.Month/@inventory.CreateTime.Day&nbsp;&nbsp;@inventory.CreateTime.Hour:@inventory.CreateTime.Minute
                </span>
                <a onclick="deleteInventory(@inventory.InventoryId)" data-toggle="modal" data-target="#delete_inventory">
                <img src="~/images/Inventory/删除 (2).png" alt="图标" class=" remove-icon" /></a>
            </li>
        }
    </ul>
</div>
<div class="modal fade" id="delete_inventory">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="myModalLabel">
                    你确定要删除吗？
                </h4>
            </div>
            <div class="modal-footer">
                <input type="hidden" name="inventoryId" id="input" />
                <button type="button" class="btn btn-default" data-dismiss="modal">
                    取消
                </button>
                <button type="button" class="btn btn-primary" onclick="DeleteInventory()">
                    确定
                </button>
            </div>
        </div>
    </div>
</div>